package order

import (
	"crmeb-common/global"
	"math/big"
	"time"
)

// RefundOrder 退款单表
type RefundOrder struct {
	global.BaseModel
	RefundOrderNo string `json:"refundOrderNo" gorm:"column=refund_order_no;comment:退款订单号"`

	OrderNo string `json:"orderNo" gorm:"column=order_no;comment:主订单号"`

	MerId int32 `json:"merId" gorm:"column=mer_id;comment:商户ID"`

	Uid int32 `json:"uid" gorm:"column=uid;comment:用户id"`

	RealName string `json:"realName" gorm:"column=real_name;comment:收货人姓名"`

	UserPhone string `json:"userPhone" gorm:"column=user_phone;comment:收货人电话"`

	UserAddress string `json:"userAddress" gorm:"column=user_address;comment:收货人详细地址"`

	TotalNum int32 `json:"totalNum" gorm:"column=total_num;comment:退款单商品总数"`

	RefundReasonWap string `json:"refundReasonWap" gorm:"column=refund_reason_wap;comment:退款原因"`

	RefundReasonWapImg string `json:"refundReasonWapImg" gorm:"column=refund_reason_wap_img;comment:退款图片"`

	RefundReasonWapExplain string `json:"refundReasonWapExplain" gorm:"column=refund_reason_wap_explain;comment:退款用户说明"`

	IsAll bool `json:"isAll" gorm:"column=is_all;comment:是否整单退款"`

	RefundStatus int32 `json:"refundStatus" gorm:"column=refund_status;comment:售后状态：0:待审核 1:商家拒绝 2：退款中 3:已退款 4:用户退货 5:商家待收货 6:已撤销"`

	RefundFreightFee big.Float `json:"refundFreightFee" gorm:"column=refund_freight_fee;comment:退运费金额"`

	RefundReason string `json:"refundReason" gorm:"column=refund_reason;comment:拒绝退款说明"`

	RefundPrice big.Float `json:"refundPrice" gorm:"column=refund_price;comment:退款金额"`

	MerchantRefundPrice big.Float `json:"merchantRefundPrice" gorm:"column=merchant_refund_price;comment:商家退款金额"`

	PlatformRefundPrice big.Float `json:"platformRefundPrice" gorm:"column=platform_refund_price;comment:平台退款金额"`

	RefundFirstBrokerageFee big.Float `json:"refundFirstBrokerageFee" gorm:"column=refund_first_brokerage_fee;comment:退一级返佣金额"`

	RefundSecondBrokerageFee big.Float `json:"refundSecondBrokerageFee" gorm:"column=refund_second_brokerage_fee;comment:退二级返佣金额"`

	IsReplace bool `json:"isReplace" gorm:"column=is_replace;comment:是否平台代扣佣金"`

	RefundUseIntegral int32 `json:"refundUseIntegral" gorm:"column=refund_use_integral;comment:退还使用积分"`

	RefundGainIntegral int32 `json:"refundGainIntegral" gorm:"column=refund_gain_integral;comment:扣除赠送积分"`

	RefundIntegralPrice big.Float `json:"refundIntegralPrice" gorm:"column=refund_integral_price;comment:退款积分抵扣金额"`

	RefundTime time.Time `json:"refundTime" gorm:"column=refund_time;comment:退款时间"`

	RefundPayType string `json:"refundPayType" gorm:"column=refund_pay_type;comment:退款渠道类型:weixin,alipay,yue"`

	MerRemark string `json:"merRemark" gorm:"column=mer_remark;comment:商户备注"`

	PlatformRemark string `json:"platformRemark" gorm:"column=platform_remark;comment:平台备注"`

	RefundPlatCouponPrice big.Float `json:"refundPlatCouponPrice" gorm:"column=refund_plat_coupon_price;comment:退还平台优惠券补贴金额"`

	AfterSalesType int32 `json:"afterSalesType" gorm:"column=after_sales_type;comment:售后类型：1-仅退款，2-退货退款"`

	ReturnGoodsType int32 `json:"returnGoodsType" gorm:"column=return_goods_type;comment:退货类型：0-不退货 1-快递退回，2-到店退货"`

	Receiver string `json:"receiver" gorm:"column=receiver;comment:收货人姓名"`

	ReceiverPhone string `json:"receiverPhone" gorm:"column=receiver_phone;comment:收货人电话"`

	ReceiverAddressDetail string `json:"receiverAddressDetail" gorm:"column=receiver_address_detail;comment:收货人详细地址"`

	ExpressName string `json:"expressName" gorm:"column=express_name;comment:物流公司名称"`

	TrackingNumber string `json:"trackingNumber" gorm:"column=tracking_number;comment:运单号"`

	Telephone string `json:"telephone" gorm:"column=telephone;comment:用户联系电话"`

	IsCompulsoryRefund bool `json:"isCompulsoryRefund" gorm:"column=is_compulsory_refund;comment:是否强制退款"`

	CompulsoryAdminId int32 `json:"compulsoryAdminId" gorm:"column=compulsory_admin_id;comment:强制操作账户ID"`

	IsUserRevoke bool `json:"isUserRevoke" gorm:"column=is_user_revoke;comment:是否用户撤销"`
}
